import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_face_plugin/flutter_face_plugin.dart';
import 'package:flutter_face_plugin/flutter_face_plugin_platform_interface.dart';
import 'package:flutter_face_plugin/flutter_face_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockFlutterFacePluginPlatform
    with MockPlatformInterfaceMixin
    implements FlutterFacePluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final FlutterFacePluginPlatform initialPlatform = FlutterFacePluginPlatform.instance;

  test('$MethodChannelFlutterFacePlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelFlutterFacePlugin>());
  });

  test('getPlatformVersion', () async {
    FlutterFacePlugin flutterFacePlugin = FlutterFacePlugin();
    MockFlutterFacePluginPlatform fakePlatform = MockFlutterFacePluginPlatform();
    FlutterFacePluginPlatform.instance = fakePlatform;

    expect(await flutterFacePlugin.getPlatformVersion(), '42');
  });
}
